import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 首页
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/home/index.vue'),
      children: [
{
  path: '/home/heared',
  name: 'userHreaded',
  component: () => import('@/homelayout/header/index.vue')

},{
  path: '/home/main',
  name: 'userMain',
  component: () => import('@/homelayout/main/index.vue')
}
      ]
    },
// 系统用户登录
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/Login.vue')
    },
// 客户
{
path: '/user/login',
name: 'userLogin',
component: () => import('@/homelayout/header/userLogin.vue')
},
// 客户注册
{
  path: '/home/heared/addUser',
  name: 'userAdd',
  component: () => import('@/homelayout/header/userAdd.vue')
},

{
path: '/home/main/cart',
name:"UserCart",
component: () => import('@/homelayout/car/index.vue')
},
    // 我的面试
    {
      path: '/home/main/interview',
      name:"UserInterview",
      component: () => import('@/homelayout/interview/index.vue')
    },
// 客户订单
{
path: '/home/main/order',
name:"UserOrder",
component: () => import('@/homelayout/order/index.vue')
},
// 订单生成页面
{
  path: '/home/main/createOrder',
  name:"UserCreateOrder",
  component: () => import('@/homelayout/order/createIndex.vue')
  },
// 浏览足迹
{
  path: '/home/main/browse',
  name:"UserBrowse",
  component: () => import('@/homelayout/browse/index.vue')
  },
// 商品的列表
{
path: '/home/main/productList',
name:"UserProductList",
component: () => import('@/homelayout/product/productSkcu.vue')

},
// 商品详情
{
path: '/home/main/productdetail',
name:"UserProductDetail",
component: () => import('@/homelayout/product/product.vue')

},

    {
      //系统 首页
      path: '/layout',
      name: 'layout',
      component: () => import('@/layout/index.vue'),
      children: [
        // 首页头部
      {
        path: '/header',
        name: 'header',
        component: () => import('@/layout/header/index.vue')
      },
      // 首页中间显示内容
      {
        path: '/sysMain',
        name: 'sysMain',
        component: () => import('@/layout/main/index.vue'),
        children: [
          {
            path: '/sysMenuRole',
            name: 'sysMenuRole',
            component: () => import('@/layout/side/system/sysRole.vue')
          },
          {
            path: '/sysMenuUser',
            name: 'sysMenuUser',
            component: () => import('@/layout/side/system/sysUser.vue')
          },
          {
            path: '/sysMenuMenu',
            name: 'sysMenuMenu',
            component: () => import('@/layout/side/system/sysMenu.vue')
          },

          {
            path: '/sysCompanyFirm',
            name: 'sysCompanyFirm',
            component: () => import('@/layout/side/company/companyFirm.vue')
          },

          {
            path: '/sysCompanyJob',
            name: 'sysCompanyJob',
            component: () => import('@/layout/side/company/companyJob.vue')
          },

          {
            path: '/sysCompanyUser',
            name: 'sysCompanyUser',
            component: () => import('@/layout/side/company/sysCompanyUser.vue')
          },


          {
            path: '/sysCompanyInterview',
            name: 'sysCompanyInterview',
            component: () => import('@/layout/side/company/sysCompanyInterview.vue')
          },


          {
            path: '/sysMenuBehaviorLogs',
            name: 'sysMenuBehaviorLogs',
            component: () => import('@/layout/side/logs/behaviorLogs.vue')
          },
          {
            path: '/sysMenuControlsLogs',
            name: 'sysMenuControlsLogs',
            component: () => import('@/layout/side/logs/controlsLogs.vue')
          }





        ]
      
      },
      // 首页菜单
      {
        path: '/side',
        name: 'side',
        component: () => import('@/layout/side/index.vue')
// 在这个菜单中完成二级菜单的显示，以及内容展示区

      }
    ]
    },

    // 重置密码页面
    {
      path: '/resetPassword',
      name: 'resetPassword',
      component: () => import('@/views/ResetPassword.vue')
    },
     // 客户重置密码页面
     {
      path: '/userResetPassword',
      name: 'userResetPassword',
      component: () => import('@/views/UserResetPassword.vue')
    },
// 通配符路由，匹配所有无法识别的路径
{
  path: '/:pathMatch(.*)*',
  component: () => import('@/error/NotFount.vue')
}
  ]
})

export default router
